<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$wa->appName()} &mdash; {$wa->accountName()}</title>
    {$wa->css()}
    <script src="{$wa_url}wa-content/js/jquery/jquery-3.6.0.min.js"></script>
    <script src="{$wa_url}wa-content/js/jquery-wa/wa.js?v={$wa->version(true)}"></script>
    <script>
        if (typeof $.restclient !== "object") {
            $.restclient = new Object();
        }
        $.restclient.csrf = '{$csrf}';
        $.restclient.urls = {
            "wa_url": {$wa_url|json_encode},
            "send_request": "{$wa_app_url}?action=sendRequest",
        };
        $.restclient.version = '{$version}';
        $.restclient.max_file_size = {waRequest::getUploadMaxFilesize()|json_encode};
        $.restclient.max_post_size = {waRequest::getPostMaxSize()|json_encode};

        var sources = [{
                id: "vue-js",
                type: "js",
                uri: "{$wa_app_static_url}js/vue/{if $wa->debug()}vue.global.js{else}vue.global.prod.js{/if}?v={$version}"
            },
            {
                id: "wa-js",
                type: "js",
                uri: "{$wa_url}wa-content/js/jquery-wa/wa.js"
            },
        ];
        $.wa.loadSources(sources);
    </script>

    {if $debug}
        <script type="module" defer src="{$wa_app_static_url}templates/actions/backend/Backend.js?v={time()}"></script>
    {else}
        <script type="module" defer src="{$wa_app_static_url}templates/actions/backend/Backend.prod.js?v={time()}"></script>
    {/if}
    <noscript>
        <strong>We're sorry but this site doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript> 
</head>
<body>
    <div id="wa">
        {$wa->header()}
        <div id="content"></div>
    </div>
</body>
</html>
